﻿@{
    var classname = TempData["sidecalss"];
    classname = classname ?? "EveryDayWisdom";
    var classnamecontent = classname + "Content";
    var everyDayWisdom = ViewData["EveryDayWisdom"] as HanGu.Entity.EveryDayWisdom;
    var Lecturers = ViewData["Lecturers"] as List<HanGu.Entity.VBemaLecturerInfo>;
    var Advertisements = ViewData["Advertisement"] as List<HanGu.Entity.Advertisement> ?? new List<HanGu.Entity.Advertisement>();
    
}
<table cellpadding="0" cellspacing="0" class="style1" id="tableRightSide">
    <tr>
        <td class="left_top">
        </td>
        <td class="middle_top">
        </td>
        <td class="right_top">
        </td>
    </tr>
    <tr>
        <td class="left_middle">
        </td>
        <td style="vertical-align: top">
            @if (everyDayWisdom != null && classname == "EveryDayWisdom")
            {
                <div class="EveryDayWisdom">
                    <div class="EveryDayWisdomContent">
                        @everyDayWisdom.Remark</div>
                    <div class="EveryDayWisdomSource">
                        @everyDayWisdom.Author</div>
                </div>
            }
            else if (Lecturers != null)
            {
                <div class="EducationLecturer">
                    <div class="EducationLecturerContent">
                        <div style="text-align: center; line-height: 100%">
                            诸子名录</div>
                        <div style="height: 20px">
                        </div>
                        @foreach (var item in Lecturers)
                        {
                            <div style="width: 150px; overflow: hidden; margin-top: 0px; text-overflow: ellipsis;
                                white-space: nowrap;">
                                @if (item != null && !string.IsNullOrEmpty(item.LecturerID) && !string.IsNullOrEmpty(item.LecturerName))
                                {
                                    string[] lecturerids = item.LecturerID.Split(',');
                                    string[] lecturerNames = item.LecturerName.Split(',');
                                    if (lecturerids != null && lecturerNames != null && lecturerids.Length == lecturerNames.Length)
                                    {
                                        for (int i = 0; i < lecturerids.Length; i++)
                                        {
                                    <a href="/Lecturers/detail/@lecturerids[i]" style="color:#fff" title="@lecturerNames[i]:@item.Title">@lecturerNames[i]:@item.Title</a>
                                        }
                                    }
                                }
                                }
                            </div>
                        }
                    </div>
                    <div class="EducationLecturerSource">
                        <a href="/Lecturers"><span class="EducationLecturerSource">更多》</span></a></div>
                </div>
                
            }
            <div style="height: 50px">
            </div>
            <div>
                <div class="online">
                    @MvcHtmlString.Create(Hangu.WebClient.HelperCommon.OnlineSource)
                </div>
                @foreach (var item in Advertisements)
                {
                    <div class="rightAD">
                        <a href="@item.Url">
                            <img src="@item.FilePath" title="@item.Title" /></a>
                    </div>
                }
            </div>
        </td>
        <td class="right_middle">
        </td>
    </tr>
    <tr>
        <td class="bottom" colspan="3">
        </td>
    </tr>
</table>
